package com.huike.mapper.activity;


import com.github.pagehelper.Page;
import com.huike.dto.ActivityDTO;
import com.huike.pojo.Activity;
import com.huike.pojo.Activity_Channel;
import com.huike.pojo.Activity_Status;
import com.huike.pojo.Activity_Vouchers;
import com.huike.result.Result;
import com.huike.vo.ActivityVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper {

    Page<ActivityVO> page(ActivityDTO dto);

    @Select("select * from lh_activity_channel")
    List<Activity_Channel>  findChannel(Activity_Channel channel);

    @Select("select *from lh_activity_vouchers")
    List<Activity_Vouchers> findVouchers(Activity_Vouchers vouchers);

    @Select("select * from lh_activity_status")
    List<Activity_Status> findStatus(Activity_Status status);


    void save(Activity activity);

    void delete(Long id);

    @Select("select * from lh_activity where id=#{id}")
    ActivityVO findById(Long id);

    void update(Activity activity);

}
